package costamt;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;


public class Form extends javax.swing.JFrame {

   
    public static ArrayList<String> filedb = new ArrayList();
    static int isen, idb;
    protected int fluen = 0;
    protected int adeq = 0;
    //variables for linguistic errors
    protected String gram1;
    protected String gram2;
    protected String gram3;
    protected String gram4;
    protected String gram5;
    protected String gram6;
    protected String gram7;
    protected String word1;
    protected String word2;
    protected String word3;
    protected String word4;
    protected String word5;
    protected String word6;
    protected String word7;
    protected String style1;
    protected String style2;
    protected String style3;
    protected String style4;
    protected String style5;
    protected String style6;
    protected String style7;
    static Date fluendate;
    static Date adeqdate;
    static Date tempdate;
    static long fluentime, adeqtime, starttime;
    static String sysfiletemp;
    static String dbfiletemp;
    static String resfiletemp;

   
    @SuppressWarnings("empty-statement")
    public Form(String systemp, String dbtemp, String restemp) {
        sysfiletemp = systemp;
        dbfiletemp = dbtemp;
        resfiletemp = restemp;
        filedb.clear();
        try {
            ReadTxt.ReadTxt(filedb, dbfiletemp);

        } catch (Exception ex) {
            Logger.getLogger(Form.class.getName()).log(Level.SEVERE, null, ex);
        }
        initComponents();
        this.setLocationRelativeTo(null);
        this.setVisible(true);
        
        tempdate = new Date();
        starttime = tempdate.getTime();
        
        gram1 = "0";
        gram2 = "0";
        gram3 = "0";
        gram4 = "0";
        gram5 = "0";
        gram6 = "0";
        gram7 = "0";

        word1 = "0";
        word2 = "0";
        word3 = "0";
        word4 = "0";
        word5 = "0";
        word6 = "0";
        word7 = "0";

        style1 = "0";
        style2 = "0";
        style3 = "0";
        style4 = "0";
        style5 = "0";
        style6 = "0";
        style7 = "0";
        
        int linesdone = 0;
        
        try {
            BufferedReader reader = new BufferedReader(new FileReader(resfiletemp));
            String line = reader.readLine();
            while (line != null) {
                linesdone++;
                line = reader.readLine();
            }
            isen = linesdone + 1;
            idb = linesdone * 3 + 1;

            reader.close();
        } catch (Exception ex) {
        }

        jLabelCounter.setText("Sentence: " + Integer.toString(isen) + "/" + Integer.toString(filedb.size() / 3));
    
        jLabelSuggestion.setVisible(false);
      
        //SOR TEXT AREA
      
        jTextAreaSOR.setText(filedb.get(idb - 1));
        jTextAreaSOR.setEditable(false);
        jTextAreaSOR.setLineWrap(true);


        //MT TEXT AREA
        jTextAreaMT.setText(filedb.get(idb));
        jTextAreaMT.setEditable(false);
        jTextAreaMT.setLineWrap(true);
        jTextAreaREF.setEditable(false);

        //BUTTONS ADEQUACY
        jRadioButtonA1.setEnabled(false);
        jRadioButtonA2.setEnabled(false);
        jRadioButtonA3.setEnabled(false);
        jRadioButtonA4.setEnabled(false);
        jRadioButtonA5.setEnabled(false);
      
    }

    public void actionPerformed(ActionEvent e) {
      
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jPanel3 = new javax.swing.JPanel();
        jCheckBox8 = new javax.swing.JCheckBox();
        jCheckBox9 = new javax.swing.JCheckBox();
        jCheckBox6 = new javax.swing.JCheckBox();
        jCheckBox7 = new javax.swing.JCheckBox();
        jCheckBox12 = new javax.swing.JCheckBox();
        jCheckBox10 = new javax.swing.JCheckBox();
        jCheckBox11 = new javax.swing.JCheckBox();
        jCheckBox16 = new javax.swing.JCheckBox();
        jCheckBox15 = new javax.swing.JCheckBox();
        jCheckBox14 = new javax.swing.JCheckBox();
        jCheckBox13 = new javax.swing.JCheckBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaMT = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextAreaSOR = new javax.swing.JTextArea();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextAreaREF = new javax.swing.JTextArea();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jRadioButtonA4 = new javax.swing.JRadioButton();
        jRadioButtonA3 = new javax.swing.JRadioButton();
        jCheckBox3 = new javax.swing.JCheckBox();
        jLabelREF = new javax.swing.JLabel();
        jLabelMT = new javax.swing.JLabel();
        jCheckBox5 = new javax.swing.JCheckBox();
        jRadioButtonF1 = new javax.swing.JRadioButton();
        jCheckBox4 = new javax.swing.JCheckBox();
        jButtonNext = new javax.swing.JButton();
        jRadioButtonA1 = new javax.swing.JRadioButton();
        jLabelSOR = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jTextFieldComSt = new javax.swing.JTextField();
        jTextFieldComGr = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldComWo = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        jRadioButtonF5 = new javax.swing.JRadioButton();
        jLabelCounter = new javax.swing.JLabel();
        jRadioButtonF3 = new javax.swing.JRadioButton();
        jRadioButtonF4 = new javax.swing.JRadioButton();
        jRadioButtonA5 = new javax.swing.JRadioButton();
        jRadioButtonF2 = new javax.swing.JRadioButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jCheckBox21 = new javax.swing.JCheckBox();
        jCheckBox18 = new javax.swing.JCheckBox();
        jCheckBox17 = new javax.swing.JCheckBox();
        jCheckBox20 = new javax.swing.JCheckBox();
        jCheckBox19 = new javax.swing.JCheckBox();
        jRadioButtonA2 = new javax.swing.JRadioButton();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabelSuggestion = new javax.swing.JLabel();

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("COSTA MT Evaluation Tool");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jPanel3.setAutoscrolls(true);
        jPanel3.setPreferredSize(new java.awt.Dimension(1024, 700));

        jCheckBox8.setText("Terminology");
        jCheckBox8.setToolTipText("Incorrect terminology");
        jCheckBox8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox8ActionPerformed(evt);
            }
        });

        jCheckBox9.setText("Multi-word units");
        jCheckBox9.setToolTipText("Incorrect translation of multi-word expressions and idioms");
        jCheckBox9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox9ActionPerformed(evt);
            }
        });

        jCheckBox6.setText("Preposition");
        jCheckBox6.setToolTipText("Incorrect, absent or unneeded preposition");
        jCheckBox6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox6ActionPerformed(evt);
            }
        });

        jCheckBox7.setText("Agreement");
        jCheckBox7.setToolTipText("Incorrect agreement between subject-verb, noun-adjective, past participle agreement with preceding direct object, etc.");
        jCheckBox7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox7ActionPerformed(evt);
            }
        });

        jCheckBox12.setText("Single words");
        jCheckBox12.setToolTipText("Sentence elements ordered incorrectly");
        jCheckBox12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox12ActionPerformed(evt);
            }
        });

        jCheckBox10.setText("Ambiguous translation");
        jCheckBox10.setToolTipText("Ambiguous target language");
        jCheckBox10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox10ActionPerformed(evt);
            }
        });

        jCheckBox11.setText("Untranslated words");
        jCheckBox11.setToolTipText("Word not in dictionary");
        jCheckBox11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox11ActionPerformed(evt);
            }
        });

        jCheckBox16.setText("Acronyms - Abbreviations");
        jCheckBox16.setToolTipText("Incorrect abbreviations, acronyms and symbols");
        jCheckBox16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox16ActionPerformed(evt);
            }
        });

        jCheckBox15.setText("Accent");
        jCheckBox15.setToolTipText("Incorrect accents");
        jCheckBox15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox15ActionPerformed(evt);
            }
        });

        jCheckBox14.setText("Conjunctions");
        jCheckBox14.setToolTipText("Failure to reconstruct parallel constituents after conjunction, or failure to Identify boundaries of conjoined units");
        jCheckBox14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox14ActionPerformed(evt);
            }
        });

        jCheckBox13.setText("Literal translation");
        jCheckBox13.setToolTipText("Word-for-word translation");
        jCheckBox13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox13ActionPerformed(evt);
            }
        });

        jScrollPane1.setPreferredSize(new java.awt.Dimension(100, 50));

        jTextAreaMT.setColumns(20);
        jTextAreaMT.setRows(5);
        jTextAreaMT.setPreferredSize(new java.awt.Dimension(104, 54));
        jScrollPane1.setViewportView(jTextAreaMT);

        jTextAreaSOR.setColumns(20);
        jTextAreaSOR.setRows(5);
        jTextAreaSOR.setPreferredSize(new java.awt.Dimension(104, 54));
        jScrollPane2.setViewportView(jTextAreaSOR);

        jTextAreaREF.setColumns(20);
        jTextAreaREF.setRows(5);
        jTextAreaREF.setPreferredSize(new java.awt.Dimension(104, 54));
        jScrollPane3.setViewportView(jTextAreaREF);

        jCheckBox1.setText("Verb inflection");
        jCheckBox1.setToolTipText("Incorrectly formed verb, or wrong tense");
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        jCheckBox2.setText("Noun inflection");
        jCheckBox2.setToolTipText("Incorrectly formed noun");
        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });

        jRadioButtonA4.setText("4. Most meaning");
        jRadioButtonA4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonA4ActionPerformed(evt);
            }
        });

        jRadioButtonA3.setText("3. Much meaning");
        jRadioButtonA3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonA3ActionPerformed(evt);
            }
        });

        jCheckBox3.setText("Other inflection");
        jCheckBox3.setToolTipText("Incorrectly formed adjective or adverb");
        jCheckBox3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox3ActionPerformed(evt);
            }
        });

        jLabelREF.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabelREF.setText("Reference:");

        jLabelMT.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabelMT.setText("MT:");

        jCheckBox5.setText("Article");
        jCheckBox5.setToolTipText("Absent or unneeded article");
        jCheckBox5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox5ActionPerformed(evt);
            }
        });

        jRadioButtonF1.setText("1. Incomprehensible ");
        jRadioButtonF1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonF1ActionPerformed(evt);
            }
        });

        jCheckBox4.setText("Wrong category");
        jCheckBox4.setToolTipText("Category error (e.g. noun vs. verb)");
        jCheckBox4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox4ActionPerformed(evt);
            }
        });

        jButtonNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/next.png"))); // NOI18N
        jButtonNext.setText("Next");
        jButtonNext.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNextActionPerformed(evt);
            }
        });

        jRadioButtonA1.setText("1. None");
        jRadioButtonA1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonA1ActionPerformed(evt);
            }
        });

        jLabelSOR.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabelSOR.setText("Source:");

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel10.setText("Comments:");

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel9.setText("Comments:");

        jTextFieldComSt.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextFieldComSt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldComStActionPerformed(evt);
            }
        });

        jTextFieldComGr.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextFieldComGr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldComGrActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel4.setText("Adequacy:");
        jLabel4.setToolTipText("Does the output convey the same meaning as the input sentence? Is part of the message lost, added, or distorted?");

        jTextFieldComWo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N

        jRadioButtonF5.setText("5.  Flawless language");
        jRadioButtonF5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonF5ActionPerformed(evt);
            }
        });

        jLabelCounter.setText("number/number");
        jLabelCounter.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

        jRadioButtonF3.setText("3. Non-native language");
        jRadioButtonF3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonF3ActionPerformed(evt);
            }
        });

        jRadioButtonF4.setText("4. Good language");
        jRadioButtonF4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonF4ActionPerformed(evt);
            }
        });

        jRadioButtonA5.setText("5. All meaning");
        jRadioButtonA5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonA5ActionPerformed(evt);
            }
        });

        jRadioButtonF2.setText("2. Disfluent language");
        jRadioButtonF2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonF2ActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel1.setText("Translation error classification");

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel5.setText("Fluency:");
        jLabel5.setToolTipText("Is the output good  fluent language? This involves both grammatical correctness and idiomatic word choices.");

        jButton2.setText("Stop & get results");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel2.setText("Style:");

        jCheckBox21.setText("Extra words");
        jCheckBox21.setToolTipText("Extra words in target language");
        jCheckBox21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox21ActionPerformed(evt);
            }
        });

        jCheckBox18.setText("Country standards ");
        jCheckBox18.setToolTipText("Incorrect format of dates, addresses, currency etc. ");
        jCheckBox18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox18ActionPerformed(evt);
            }
        });

        jCheckBox17.setText("Punctuation");
        jCheckBox17.setToolTipText("Punctuation is incorrect, absent or unneeded");
        jCheckBox17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox17ActionPerformed(evt);
            }
        });

        jCheckBox20.setText("Spelling errors");
        jCheckBox20.setToolTipText("Misspelled words");
        jCheckBox20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox20ActionPerformed(evt);
            }
        });

        jCheckBox19.setText("Capitalization");
        jCheckBox19.setToolTipText("Incorrect upper or lower case");
        jCheckBox19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox19ActionPerformed(evt);
            }
        });

        jRadioButtonA2.setText("2. Little meaning");
        jRadioButtonA2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonA2ActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel6.setText("Grammar:");

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 30)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(0, 153, 255));
        jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/logo64.png"))); // NOI18N
        jLabel7.setText("COSTA MT Evaluation Tool ");

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/question_small.png"))); // NOI18N
        jButton1.setText("Help");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel8.setText("Comments:");

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 13)); // NOI18N
        jLabel3.setText("Words:");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(419, 419, 419)
                        .addComponent(jLabel1)
                        .addGap(0, 644, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton2)
                                .addGap(4, 4, 4)
                                .addComponent(jButton1))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabelSOR)
                                            .addComponent(jLabelMT)
                                            .addComponent(jLabel4)
                                            .addComponent(jLabel5))
                                        .addGap(15, 15, 15))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabelREF)
                                        .addGap(18, 18, 18)))
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jRadioButtonF1)
                                        .addGap(16, 16, 16)
                                        .addComponent(jRadioButtonF2)
                                        .addGap(20, 20, 20)
                                        .addComponent(jRadioButtonF3)
                                        .addGap(18, 18, 18)
                                        .addComponent(jRadioButtonF4)
                                        .addGap(18, 18, 18)
                                        .addComponent(jRadioButtonF5)
                                        .addGap(0, 0, Short.MAX_VALUE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel3Layout.createSequentialGroup()
                                                .addComponent(jRadioButtonA1)
                                                .addGap(18, 18, 18)
                                                .addComponent(jRadioButtonA2)
                                                .addGap(18, 18, 18)
                                                .addComponent(jRadioButtonA3)
                                                .addGap(18, 18, 18)
                                                .addComponent(jRadioButtonA4)
                                                .addGap(18, 18, 18)
                                                .addComponent(jRadioButtonA5)
                                                .addGap(0, 0, Short.MAX_VALUE))
                                            .addComponent(jLabelCounter, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonNext, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jScrollPane2)
                                    .addComponent(jScrollPane3)))
                            .addComponent(jSeparator1)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel6)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel10))
                                .addGap(10, 10, 10)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jCheckBox1)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox2)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox3)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox4)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox5)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox6)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox7))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jCheckBox12)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox9)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox8)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox11)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox10)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox13)
                                        .addGap(18, 18, 18)
                                        .addComponent(jCheckBox14))
                                    .addComponent(jTextFieldComWo)
                                    .addComponent(jTextFieldComGr))))
                        .addGap(10, 10, 10))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel9))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldComSt)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jCheckBox16)
                                .addGap(18, 18, 18)
                                .addComponent(jCheckBox21)
                                .addGap(18, 18, 18)
                                .addComponent(jCheckBox18)
                                .addGap(18, 18, 18)
                                .addComponent(jCheckBox20)
                                .addGap(18, 18, 18)
                                .addComponent(jCheckBox15)
                                .addGap(10, 10, 10)
                                .addComponent(jCheckBox19)
                                .addGap(18, 18, 18)
                                .addComponent(jCheckBox17)
                                .addGap(0, 285, Short.MAX_VALUE)))
                        .addContainerGap())))
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(310, 310, 310)
                    .addComponent(jLabelSuggestion, javax.swing.GroupLayout.PREFERRED_SIZE, 438, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(530, Short.MAX_VALUE)))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jButton2)
                    .addComponent(jButton1))
                .addGap(25, 25, 25)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelSOR)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelMT)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButtonF3)
                    .addComponent(jRadioButtonF4)
                    .addComponent(jRadioButtonF1)
                    .addComponent(jRadioButtonF2)
                    .addComponent(jRadioButtonF5)
                    .addComponent(jLabel5))
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelREF)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButtonA1)
                    .addComponent(jRadioButtonA2)
                    .addComponent(jRadioButtonA3)
                    .addComponent(jRadioButtonA4)
                    .addComponent(jRadioButtonA5)
                    .addComponent(jLabel4))
                .addGap(3, 3, 3)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonNext)
                    .addComponent(jLabelCounter, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox1)
                    .addComponent(jCheckBox2)
                    .addComponent(jCheckBox3)
                    .addComponent(jCheckBox4)
                    .addComponent(jCheckBox5)
                    .addComponent(jCheckBox6)
                    .addComponent(jCheckBox7)
                    .addComponent(jLabel6))
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldComGr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox12)
                    .addComponent(jCheckBox9)
                    .addComponent(jCheckBox8)
                    .addComponent(jCheckBox11)
                    .addComponent(jCheckBox10)
                    .addComponent(jCheckBox13)
                    .addComponent(jCheckBox14)
                    .addComponent(jLabel3))
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldComWo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addGap(10, 10, 10)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jCheckBox16)
                        .addComponent(jCheckBox21)
                        .addComponent(jCheckBox18)
                        .addComponent(jCheckBox20)
                        .addComponent(jCheckBox15)
                        .addComponent(jCheckBox19)
                        .addComponent(jCheckBox17)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldComSt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addContainerGap(137, Short.MAX_VALUE))
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(384, 384, 384)
                    .addComponent(jLabelSuggestion)
                    .addContainerGap(382, Short.MAX_VALUE)))
        );

        jScrollPane5.setViewportView(jPanel3);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 1280, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
       
        String message =
        "<html>The objective of the <b>Fluency</b> evaluation is to determine how much like \"good fluent\" a translation appears to be, without taking into account \n"
        + "account the correctness of the information. The evaluation is doing segment-by-segment on a 1-5 scale without referring to any reference text. \n \n"
        + "<html>The objective of the <b>Adequacy</b> is to determine the extent to which all of the content of a text is conveyed, regardless of the quality of the \n"
        + "language in the candidate translation. The evaluation is doing segment-by-segment on a 1-5 scale.";
        JOptionPane.showMessageDialog(this, message);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jRadioButtonA2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonA2ActionPerformed
       adeqdate = new Date();
        adeqtime = adeqdate.getTime();
        adeq = 2;
        jRadioButtonA1.setEnabled(false);
        jRadioButtonA2.setEnabled(false);
        jRadioButtonA3.setEnabled(false);
        jRadioButtonA4.setEnabled(false);
        jRadioButtonA5.setEnabled(false);
        
    }//GEN-LAST:event_jRadioButtonA2ActionPerformed

    private void jCheckBox19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox19ActionPerformed
        style6 = "1";
    }//GEN-LAST:event_jCheckBox19ActionPerformed

    private void jCheckBox20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox20ActionPerformed
        style4 = "1";
    }//GEN-LAST:event_jCheckBox20ActionPerformed

    private void jCheckBox17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox17ActionPerformed
        style7 = "1";
    }//GEN-LAST:event_jCheckBox17ActionPerformed

    private void jCheckBox18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox18ActionPerformed
        style3 = "1";
    }//GEN-LAST:event_jCheckBox18ActionPerformed

    private void jCheckBox21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox21ActionPerformed
        style2 = "1";
    }//GEN-LAST:event_jCheckBox21ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        this.dispose();
        new Results(resfiletemp, sysfiletemp, dbfiletemp).setVisible(true);      
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jRadioButtonF2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonF2ActionPerformed
        fluendate = new Date();
        fluentime = fluendate.getTime();
        fluen = 2;
        jTextAreaREF.setEnabled(true);
        jTextAreaREF.setEditable(false);
        jLabelREF.setEnabled(true);
        jTextAreaREF.setText(filedb.get(idb + 1));
        jTextAreaREF.setLineWrap(true);
        jRadioButtonF1.setEnabled(false);
        jRadioButtonF2.setEnabled(false);
        jRadioButtonF3.setEnabled(false);
        jRadioButtonF4.setEnabled(false);
        jRadioButtonF5.setEnabled(false);
        jRadioButtonA1.setEnabled(true);
        jRadioButtonA2.setEnabled(true);
        jRadioButtonA3.setEnabled(true);
        jRadioButtonA4.setEnabled(true);
        jRadioButtonA5.setEnabled(true);
        Fuzzy();
    }//GEN-LAST:event_jRadioButtonF2ActionPerformed

    private void jRadioButtonA5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonA5ActionPerformed
        adeqdate = new Date();
        adeqtime = adeqdate.getTime();
        adeq = 5;
        jRadioButtonA1.setEnabled(false);
        jRadioButtonA2.setEnabled(false);
        jRadioButtonA3.setEnabled(false);
        jRadioButtonA4.setEnabled(false);
        jRadioButtonA5.setEnabled(false);
    }//GEN-LAST:event_jRadioButtonA5ActionPerformed

    private void jRadioButtonF4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonF4ActionPerformed
        fluendate = new Date();
        fluentime = fluendate.getTime();
        fluen = 4;
        jTextAreaREF.setEnabled(true);
        jTextAreaREF.setEditable(false);
        jLabelREF.setEnabled(true);
        jTextAreaREF.setText(filedb.get(idb + 1));
        jTextAreaREF.setLineWrap(true);
        jRadioButtonF1.setEnabled(false);
        jRadioButtonF2.setEnabled(false);
        jRadioButtonF3.setEnabled(false);
        jRadioButtonF4.setEnabled(false);
        jRadioButtonF5.setEnabled(false);
        jRadioButtonA1.setEnabled(true);
        jRadioButtonA2.setEnabled(true);
        jRadioButtonA3.setEnabled(true);
        jRadioButtonA4.setEnabled(true);
        jRadioButtonA5.setEnabled(true);
        Fuzzy();
    }//GEN-LAST:event_jRadioButtonF4ActionPerformed

    private void jRadioButtonF3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonF3ActionPerformed
        fluendate = new Date();
        fluentime = fluendate.getTime();
        fluen = 3;
        jTextAreaREF.setEnabled(true);
        jTextAreaREF.setEditable(false);
        jLabelREF.setEnabled(true);
        jTextAreaREF.setText(filedb.get(idb + 1));
        jTextAreaREF.setLineWrap(true);
        jRadioButtonF1.setEnabled(false);
        jRadioButtonF2.setEnabled(false);
        jRadioButtonF3.setEnabled(false);
        jRadioButtonF4.setEnabled(false);
        jRadioButtonF5.setEnabled(false);
        jRadioButtonA1.setEnabled(true);
        jRadioButtonA2.setEnabled(true);
        jRadioButtonA3.setEnabled(true);
        jRadioButtonA4.setEnabled(true);
        jRadioButtonA5.setEnabled(true);
        Fuzzy();
    }//GEN-LAST:event_jRadioButtonF3ActionPerformed

    private void jRadioButtonF5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonF5ActionPerformed
        fluendate = new Date();
        fluentime = fluendate.getTime();
        fluen = 5;
        jTextAreaREF.setEnabled(true);
        jTextAreaREF.setEditable(false);
        jLabelREF.setEnabled(true);
        jTextAreaREF.setText(filedb.get(idb + 1));
        jTextAreaREF.setLineWrap(true);
        jRadioButtonF1.setEnabled(false);
        jRadioButtonF2.setEnabled(false);
        jRadioButtonF3.setEnabled(false);
        jRadioButtonF4.setEnabled(false);
        jRadioButtonF5.setEnabled(false);
        jRadioButtonA1.setEnabled(true);
        jRadioButtonA2.setEnabled(true);
        jRadioButtonA3.setEnabled(true);
        jRadioButtonA4.setEnabled(true);
        jRadioButtonA5.setEnabled(true);
        Fuzzy();
    }//GEN-LAST:event_jRadioButtonF5ActionPerformed

    private void jTextFieldComGrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldComGrActionPerformed
        
    }//GEN-LAST:event_jTextFieldComGrActionPerformed

    private void jTextFieldComStActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldComStActionPerformed
        
    }//GEN-LAST:event_jTextFieldComStActionPerformed

    private void jRadioButtonA1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonA1ActionPerformed
        adeqdate = new Date();
        adeqtime = adeqdate.getTime();
        adeq = 1;
        jRadioButtonA1.setEnabled(false);
        jRadioButtonA2.setEnabled(false);
        jRadioButtonA3.setEnabled(false);
        jRadioButtonA4.setEnabled(false);
        jRadioButtonA5.setEnabled(false);

    }//GEN-LAST:event_jRadioButtonA1ActionPerformed

    private void jButtonNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNextActionPerformed
     
        if (adeq > 0) {

            String commentGr = jTextFieldComGr.getText(); //comments
            String commentWo = jTextFieldComWo.getText(); //comments
            String commentSt = jTextFieldComSt.getText(); //comments

            File fres = new File(resfiletemp);

            BufferedWriter b;
            try {
                b = new BufferedWriter(new FileWriter(fres, true));
                if (isen > 1) {
                    b.newLine();
                }
                b.append(Integer.toString(isen) + "\t" + Integer.toString(fluen) + "\t" + Integer.toString(adeq) + "\t" + gram1 + "\t" + gram2 + "\t" + gram3 + "\t" + gram4 + "\t" + gram5 + "\t" + gram6 + "\t" + gram7
                    + "\t" + word1 + "\t" + word2 + "\t" + word3 + "\t" + word4 + "\t" + word5 + "\t" + word6 + "\t" + word7 + "\t" + style1 + "\t" + style2 + "\t" + style3 + "\t" + style4 + "\t" + style5 + "\t" + style6 + "\t" + style7
                    + "\t" + (fluentime-starttime)/1000 + "\t" + (adeqtime-fluentime)/1000 + "\t" + commentGr + "\t" + commentWo + "\t" + commentSt);
                b.flush();
                b.close();

            } catch (IOException ex) {
                Logger.getLogger(Form.class.getName()).log(Level.SEVERE, null, ex);
            }

            if (isen < filedb.size() / 3) {
               
                isen++;

                idb = idb + 3;

                this.dispose();
                new Form(sysfiletemp, dbfiletemp, resfiletemp).setVisible(true);
            } else {
                this.dispose();
                new Results(resfiletemp, sysfiletemp, dbfiletemp).setVisible(true);
                  }
        } else {

            String message = "Fluency and Adequacy are required";
            JOptionPane.showMessageDialog(this, message);
        }
    }//GEN-LAST:event_jButtonNextActionPerformed

    private void jCheckBox4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox4ActionPerformed
     
        gram4 = "1";
    }//GEN-LAST:event_jCheckBox4ActionPerformed

    private void jRadioButtonF1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonF1ActionPerformed
      
        fluendate = new Date();
        fluentime = fluendate.getTime();
        jRadioButtonF1.setEnabled(false);
        fluen = 1;
        jTextAreaREF.setText(filedb.get(idb + 1));
        jTextAreaREF.setEditable(false);
        jTextAreaREF.setLineWrap(true);
        jLabelREF.setEnabled(true);
        jRadioButtonF1.setEnabled(false);
        jRadioButtonF2.setEnabled(false);
        jRadioButtonF3.setEnabled(false);
        jRadioButtonF4.setEnabled(false);
        jRadioButtonF5.setEnabled(false);
        jRadioButtonA1.setEnabled(true);
        jRadioButtonA2.setEnabled(true);
        jRadioButtonA3.setEnabled(true);
        jRadioButtonA4.setEnabled(true);
        jRadioButtonA5.setEnabled(true);
        Fuzzy();
    }//GEN-LAST:event_jRadioButtonF1ActionPerformed

    private void jCheckBox5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox5ActionPerformed
   
        gram5 = "1";
    }//GEN-LAST:event_jCheckBox5ActionPerformed

    private void jCheckBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox3ActionPerformed
       
        gram3 = "1";
    }//GEN-LAST:event_jCheckBox3ActionPerformed

    private void jRadioButtonA3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonA3ActionPerformed
        adeqdate = new Date();
        adeqtime = adeqdate.getTime();
        adeq = 3;
        jRadioButtonA1.setEnabled(false);
        jRadioButtonA2.setEnabled(false);
        jRadioButtonA3.setEnabled(false);
        jRadioButtonA4.setEnabled(false);
        jRadioButtonA5.setEnabled(false);

        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonA3ActionPerformed

    private void jRadioButtonA4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonA4ActionPerformed
     
        adeqdate = new Date();
        adeqtime = adeqdate.getTime();
        adeq = 4;
        jRadioButtonA1.setEnabled(false);
        jRadioButtonA2.setEnabled(false);
        jRadioButtonA3.setEnabled(false);
        jRadioButtonA4.setEnabled(false);
        jRadioButtonA5.setEnabled(false);
    }//GEN-LAST:event_jRadioButtonA4ActionPerformed

    private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
       
        gram2 = "1";
    }//GEN-LAST:event_jCheckBox2ActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
      
        gram1 = "1";
    }//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jCheckBox13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox13ActionPerformed
       
        word6 = "1";
    }//GEN-LAST:event_jCheckBox13ActionPerformed

    private void jCheckBox14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox14ActionPerformed
    
        word7 = "1";
    }//GEN-LAST:event_jCheckBox14ActionPerformed

    private void jCheckBox15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox15ActionPerformed
        
        style5 = "1";
    }//GEN-LAST:event_jCheckBox15ActionPerformed

    private void jCheckBox16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox16ActionPerformed
      
        style1 = "1";
    }//GEN-LAST:event_jCheckBox16ActionPerformed

    private void jCheckBox11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox11ActionPerformed
      
        word4 = "1";
    }//GEN-LAST:event_jCheckBox11ActionPerformed

    private void jCheckBox10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox10ActionPerformed
        
        word5 = "1";
    }//GEN-LAST:event_jCheckBox10ActionPerformed

    private void jCheckBox12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox12ActionPerformed
       
        word1 = "1";
    }//GEN-LAST:event_jCheckBox12ActionPerformed

    private void jCheckBox7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox7ActionPerformed
       
        gram7 = "1";
    }//GEN-LAST:event_jCheckBox7ActionPerformed

    private void jCheckBox6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox6ActionPerformed
       
        gram6 = "1";
    }//GEN-LAST:event_jCheckBox6ActionPerformed

    private void jCheckBox9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox9ActionPerformed
     
        word2 = "1";
    }//GEN-LAST:event_jCheckBox9ActionPerformed

    private void jCheckBox8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox8ActionPerformed
      
        word3 = "1";
    }//GEN-LAST:event_jCheckBox8ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Form.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
               
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButtonNext;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox10;
    private javax.swing.JCheckBox jCheckBox11;
    private javax.swing.JCheckBox jCheckBox12;
    private javax.swing.JCheckBox jCheckBox13;
    private javax.swing.JCheckBox jCheckBox14;
    private javax.swing.JCheckBox jCheckBox15;
    private javax.swing.JCheckBox jCheckBox16;
    private javax.swing.JCheckBox jCheckBox17;
    private javax.swing.JCheckBox jCheckBox18;
    private javax.swing.JCheckBox jCheckBox19;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox20;
    private javax.swing.JCheckBox jCheckBox21;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JCheckBox jCheckBox4;
    private javax.swing.JCheckBox jCheckBox5;
    private javax.swing.JCheckBox jCheckBox6;
    private javax.swing.JCheckBox jCheckBox7;
    private javax.swing.JCheckBox jCheckBox8;
    private javax.swing.JCheckBox jCheckBox9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelCounter;
    private javax.swing.JLabel jLabelMT;
    private javax.swing.JLabel jLabelREF;
    private javax.swing.JLabel jLabelSOR;
    private javax.swing.JLabel jLabelSuggestion;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JRadioButton jRadioButtonA1;
    private javax.swing.JRadioButton jRadioButtonA2;
    private javax.swing.JRadioButton jRadioButtonA3;
    private javax.swing.JRadioButton jRadioButtonA4;
    private javax.swing.JRadioButton jRadioButtonA5;
    private javax.swing.JRadioButton jRadioButtonF1;
    private javax.swing.JRadioButton jRadioButtonF2;
    private javax.swing.JRadioButton jRadioButtonF3;
    private javax.swing.JRadioButton jRadioButtonF4;
    private javax.swing.JRadioButton jRadioButtonF5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTextArea jTextAreaMT;
    private javax.swing.JTextArea jTextAreaREF;
    private javax.swing.JTextArea jTextAreaSOR;
    private javax.swing.JTextField jTextFieldComGr;
    private javax.swing.JTextField jTextFieldComSt;
    private javax.swing.JTextField jTextFieldComWo;
    // End of variables declaration//GEN-END:variables

    public void Fuzzy() {

        if (filedb.get(idb).equals(filedb.get(idb + 1))) {
            jLabelSuggestion.setVisible(true);
            jLabelSuggestion.setText("100% Fuzzy Matching between Adecuacy and Reference translation!");
            jLabelSuggestion.setForeground(Color.red);
        }
    }
}
